 <?php
	require_once('db_connect.php');
	
	$facebook_id = $_GET['facebook_id']; 
	$query = "select * from interest where facebook_id='$facebook_id'";
	$data = mysqli_query($conn, $query)
		or die('interest 가져오는 쿼리 실패');
		
	if (mysqli_num_rows($data) > 0) {
		$row = mysqli_fetch_array($data);
		echo json_encode(array('interest' => $row['interest']));
	}
	else {
		echo json_encode(array('error' => 'error'));
	}
	mysqli_close($conn);
	exit;
?>